package com.yx.sys.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yx.common.vo.Result;
import com.yx.sys.entity.Followed;
import com.yx.sys.entity.Verification;
import com.yx.sys.mapper.FollowedMapper;
import com.yx.sys.mapper.VerificationMapper;
import com.yx.sys.service.IFollowedService;
import com.yx.sys.service.IVerificationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FollowedServiceImpl extends ServiceImpl<FollowedMapper, Followed> implements IFollowedService {

    @Autowired(required = false)
    private FollowedMapper followedMapper;

    @Override
    public void insertFollow(Integer followedId, Integer uId) {
        Result<?> result = followedMapper.updateFollow(followedId, uId);
        System.out.println("result:"+result);
    }

    @Override
    public boolean cancelFollow(Integer fId) {
        Boolean flag = followedMapper.delFollow(fId);
        return flag;
    }
}
